
{[include file="finance/in/_view.tpl"]}

{[include file="finance/in/item/_view.tpl"]}

<fieldset><legend>成本情况</legend>
<table style="margin-top: 10px">
	<tr>
		<th width="40">序号</th>
		<th>流水号</th>
		<th>事由</th>
		<th>实付</th>
		<th>汇率</th>
		<th>人民币</th>
		<th>备注</th>
	</tr>
	{[foreach name=outer key=key item=item from=$result.out]} 
	{[assign var="no" value="`$key+1`"]} 
	{[assign var="amount" value="`$amount+$item.amount`"]} 
	{[assign var="rmb" value="`$rmb+$item.rmb`"]}
	<tr align="center" onMouseOver="this.style.backgroundColor='#D2E4FC'" onMouseOut="this.style.backgroundColor=''">
		<td>{[$no]}</td>
		<td>{[$item.id]}</td>
		<td>{[$item.name]}</td>
		<td>{[$item.currency]} {[$item.amount]}</td>
		<td>{[$item.rate]}</td>
		<td>{[$item.rmb]}</td>
		<td>{[$item.content]}</td>
	</tr>
	{[/foreach]}
	<tr align="center" onMouseOver="this.style.backgroundColor='#D2E4FC'" onMouseOut="this.style.backgroundColor=''">
		<td colspan="2"></td>
		<td>合计</td>
		<td>{[$amount]}</td>
		<td></td>
		<td>{[$rmb]}</td>
		<td></td>
	</tr>
</table>
</fieldset>

<script type='text/javascript'>
var profit = fxadd('{[$result.rmb]}', '-{[$rmb]}');
</script>

<fieldset>
<legend>损益情况</legend>
<form id="form_edit">
<input type="hidden" name="id" value="{[$smarty.request.id]}" />
  <table>
	<tr>
		<td width="20%" align="right">损益：</td>
		<td width="80%"><input type="text" name="profit" id="profit" value="" size="12">（单位：人民币）</td>
	</tr>
	<tr>
		<td align="right">备注：</td>
		<td colspan="3"><textarea rows="2" name="content" cols="55">{[$result.content]}</textarea></td>
	</tr>
  </table>
</form>
</fieldset>

<script type="text/javascript" src="js/finance/out/item/profit.js?r={[$smarty.now]}"></script>
